<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    Promise.resolve().then(() => {
      throw new Error('err')
    }, (err) => {
      console.log(`Error1${err}`);
    }).catch(err  => {
      console.log(`Error2${err}`);
      
    })
  </script>
</body>
</html>